FROM yobasystems/alpine-docker:dind
MAINTAINER xuwenfeng

RUN apk add openjdk8
ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk
ENV PATH $PATH:$JAVA_HOME/bin
RUN echo "Asia/Shanghai" > /etc/timezone
RUN apk add  fontconfig

#此镜像可以在容器中调用宿主机的docker命令，并带有openjdk8
#sudo docker build -t='bewithmeallmylife/openjdk:8-jdk-alpine-docker-in-docker' .

#sudo docker run  --privileged -v /var/run/docker.sock:/var/run/docker.sock  --net=host  -it bewithmeallmylife/openjdk:8-jdk-alpine-docker-in-docker /bin/sh